package com.leo;

import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;

/**
 * @ClassName Student
 * @Description
 * @Author wangss
 * @date 2020.05.24 22:31
 * @Version 1.0
 */
public class Student2 {

    private SimpleStringProperty name = new SimpleStringProperty();

    private SimpleIntegerProperty age = new SimpleIntegerProperty();

    private SimpleDoubleProperty score = new SimpleDoubleProperty();

    public Student2(String name, int age, double score) {
        this.name.setValue(name);
        this.age.setValue(age);
        this.score.setValue(score);
    }

    public String getName() {
        return this.name.getValue();
    }

    public void setName(String name) {
        this.name.setValue(name);
    }

    public int getAge() {
        return this.age.getValue();
    }

    public void setAge(int age) {
        this.age.setValue(age);
    }

    public double getScore() {
        return this.score.getValue();
    }

    public void setScore(double score) {
        this.score.setValue(score);
    }

    public SimpleStringProperty getNameSimpleStringProperty() {
        return this.name;
    }

    @Override
    public String toString() {
        return "Student2{" +
                "name=" + name.getValue() +
                ", age=" + age.getValue() +
                ", score=" + score.getValue() +
                '}';
    }
}
